package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.SysSignIn;
import com.ruoyi.system.mapper.SysSignInMapper;
import com.ruoyi.system.service.ISysSignInService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户签到Service业务层处理
 *
 * @author WJH
 * @date 2021-11-29
 */
@Service
public class SysSignInServiceImpl extends ServiceImpl<SysSignInMapper, SysSignIn>  implements ISysSignInService
{
    @Autowired
    private SysSignInMapper sysSignInMapper;

    /**
     * 查询用户签到
     *
     * @param signInId 用户签到主键
     * @return 用户签到
     */
    @Override
    public SysSignIn selectSysSignInBySignInId(Long signInId)
    {
        return sysSignInMapper.selectSysSignInBySignInId(signInId);
    }

    /**
     * 查询用户签到列表
     *
     * @param sysSignIn 用户签到
     * @return 用户签到
     */
    @Override
    public List<SysSignIn> selectSysSignInList(SysSignIn sysSignIn)
    {
        return sysSignInMapper.selectSysSignInList(sysSignIn);
    }

    /**
     * 新增用户签到
     *
     * @param sysSignIn 用户签到
     * @return 结果
     */
    @Override
    public int insertSysSignIn(SysSignIn sysSignIn)
    {
        //sysSignIn.setCreateTime(System.currentTimeMillis());
        return sysSignInMapper.insertSysSignIn(sysSignIn);
    }

    /**
     * 修改用户签到
     *
     * @param sysSignIn 用户签到
     * @return 结果
     */
    @Override
    public int updateSysSignIn(SysSignIn sysSignIn)
    {
        return sysSignInMapper.updateSysSignIn(sysSignIn);
    }

    /**
     * 批量删除用户签到
     *
     * @param signInIds 需要删除的用户签到主键
     * @return 结果
     */
    @Override
    public int deleteSysSignInBySignInIds(Long[] signInIds)
    {
        return sysSignInMapper.deleteSysSignInBySignInIds(signInIds);
    }

    /**
     * 删除用户签到信息
     *
     * @param signInId 用户签到主键
     * @return 结果
     */
    @Override
    public int deleteSysSignInBySignInId(Long signInId)
    {
        return sysSignInMapper.deleteSysSignInBySignInId(signInId);
    }
}
